package com.minimalist.common.entity.basic.vo.perm;

import com.minimalist.common.config.swagger.SchemaEnum;
import com.minimalist.common.entity.basic.enums.StatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * @author 11987
 */
@Schema(name = "权限查询实体")
public class PermQueryVO implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(name = "permName", description = "权限名称", type = "string")
    private String permName;

    public String getPermName() {
        return permName;
    }

    public void setPermName(String permName) {
        this.permName = permName;
    }

    @Schema(name = "permType", description = "权限类型", type = "string")
    private String permType;

    public String getPermType() {
        return permType;
    }

    public void setPermType(String permType) {
        this.permType = permType;
    }

    @SchemaEnum(implementation = StatusEnum.class)
    @Schema(name = "status", description = "状态", type = "integer")
    private Integer status;

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PermQueryVO that = (PermQueryVO) o;
        return Objects.equals(permName, that.permName) &&
               Objects.equals(permType, that.permType) &&
               Objects.equals(status, that.status);
    }

    @Override
    public int hashCode() {
        return Objects.hash(permName, permType, status);
    }

    @Override
    public String toString() {
        return "PermQueryVO{" +
               "permName='" + permName + '\'' +
               ", permType='" + permType + '\'' +
               ", status=" + status +
               '}';
    }
}
